Make these a little longer, and include more details.
* #Keywords: GtkLayoutManager
*
* GtkConstraintLayout provides a layout manager that uses relations
- * between widgets (also known as "constraints") to compute the position
+ * between widgets (also known as “constraints”) to compute the position
* and size of each child.
+ *
+ * In addition to child widgets, the constraints can involve spacer
+ * objects (also known as “guides”). This example has a guide between
+ * the two buttons in the top row.
+ *
+ * Try resizing the window to see how the constraints react to update
+ * the layout.
*/
#include <glib/gi18n.h>
/* Constraints/Interactive
* #Keywords: GtkConstraintLayout
*
- * Demonstrate how constraints can be updates during user interaction.
+ * This example shows how constraints can be updated during user interaction.
* The vertical edge between the buttons can be dragged with the mouse.
*/
*
* GtkConstraintLayout allows defining constraints using a
* compact syntax called Visual Format Language, or VFL.
+ *
+ * A typical example of a VFL specification looks like this:
+ *
+ * H:|-[button1(==button2)]-12-[button2]-|
*/
#include <glib/gi18n.h>
/* Constraints/Builder
*
- * GtkConstraintLayouts can be created in .ui files, and
- * constraints can be set up at that time as well, as this
- * example demonstrates.
+ * GtkConstraintLayouts can be created in .ui files, and constraints can be
+ * set up at that time as well, as this example demonstrates. It uses the
+ * same setup as the “Simple” constraints demo.
*/
#include <glib/gi18n.h>
{
}
+static void
+constraints_grid_dispose (GObject *object)
+{
+ GtkWidget *widget = GTK_WIDGET (object);
+ GtkWidget *child;
+
+ while ((child = gtk_widget_get_first_child (widget)))
+ gtk_widget_unparent (child);
+
+ G_OBJECT_CLASS (constraints_grid_parent_class)->dispose (object);
+}
+
static void
constraints_grid_class_init (ConstraintsGridClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->dispose = constraints_grid_dispose;
}
GtkWidget *